
#ifndef __LENGTH_H__
#define __LENGTH_H__

#include <Unit.h>

class UnitLength : public Unit
{
public:
    static Unit& getMile();
    static Unit& getYard();
    static Unit& getFeet();
    virtual Unit& getBaseUnit() const;
    virtual string toString(const int printModel, const int amountInBaseUnit) const;
private:
    UnitLength(const int valueInBaseUnit, const UnitType& unitType, const char* unitName);
    int formatString(string& strOutput, const int amount, const Unit& unit) const;
    string toStandardString(const int amountInBaseUnit) const;
    string toBaseUnitString(const int amountInBaseUnit) const;
private:
    static const UnitType typeLength;
};

#define MILE UnitLength::getMile()
#define YARD UnitLength::getYard()
#define FEET UnitLength::getFeet()

#endif

